CFLAGS = -I/home/hcgy/extend_disk/lua/lua-5.3.0/src/ -I../../app/ -fPIC

objects = lua_gp_ctl.o action_msg.o

LDFLAGS = -shared -lpthread

_DEBUG_=1

ifeq ($(_DEBUG_),1)
CFLAGS+= -g
endif


main=mytestlib.so

all:$(objects)
	$(CXX) -o $(main) $(objects) $(LDFLAGS) 
#	$(CXX) -shared -o mytestlib.so for_lua.cpp -fPIC -I../lua-5.3.0/src/
	 

install_all:
#	cp -f $(main) /mnt/hgfs/tools/bin/
	cp -f $(main) /mnt/hgfs/tools/bin/lua/

lua_gp_ctl.o:lua_gp_ctl.cpp
	$(CXX) -c -o $@ lua_gp_ctl.cpp $(CFLAGS)
	
action_msg.o: action_msg.cpp action_msg.h
	$(CXX) -c -o $@ $< $(CFLAGS)

.PHONY : clean
clean:
	rm $(main) *.o